from flask import Flask, redirect, url_for
from restful.response import UnifiedApi
from models import db

app = Flask(__name__)
app.secret_key = '11111111111'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///bs.db'
db.init_app(app)
api=UnifiedApi(app)


from blueprints import blueprint_register
blueprint_register(app)

from restful import restful_register
restful_register(api)

@app.route('/')
def hello_world():
    return redirect(url_for('auth.get_public_page_of_login'))

if __name__ == '__main__':
    app.run()